package com.liang.study.design.service.engine;

import com.liang.study.design.constant.RuleEnum;
import com.liang.study.design.service.logic.LogicFilter;
import com.liang.study.design.service.logic.impl.AgeLogicFilter;
import com.liang.study.design.service.logic.impl.SexLogicFilter;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author lsm
 * @ClassName EngineConfig.java
 * @Description TODO
 * @createTime 2023年12月21日 11:01:00
 */
public class EngineConfig {

    static Map<RuleEnum, LogicFilter> logicFilterMap;
    static {
        logicFilterMap = new ConcurrentHashMap<>();
        logicFilterMap.put(RuleEnum.AGE, new AgeLogicFilter());
        logicFilterMap.put(RuleEnum.SEX, new SexLogicFilter());
    }
    public Map<RuleEnum, LogicFilter> getLogicFilterMap() {
        return logicFilterMap;
    }
    public void setLogicFilterMap(Map<RuleEnum, LogicFilter> logicFilterMap)
    {
        this.logicFilterMap = logicFilterMap;
    }
}
